package com.banmao.mall.service.admin;

import com.banmao.mall.model.bo.admin.system.AddPermissionBO;
import com.banmao.mall.model.bo.admin.system.AddRoleBO;
import com.banmao.mall.model.bo.admin.system.UpdateAdminBO;
import com.banmao.mall.model.pojo.Log;
import com.banmao.mall.model.pojo.Role;
import com.banmao.mall.model.pojo.Storage;
import com.banmao.mall.model.vo.admin.system.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface SystemService {

    AdminListVO selectAdminList(Integer page, Integer limit, String sort, String order,String username);

    List<RoleVO> selectRoleIdAndName();

    AddRoleVO2 addCreate(AddAdminVO addAdminVO);

    void deleteAdminById(Integer id);

    AddRoleVO2 updateAdmin(UpdateAdminBO updateAdminBO);

    LogListVO selectLogList(Integer page, Integer limit, String sort, String order,String name);

    StorageListVO selectStorageList(Integer page, Integer limit, String sort, String order, String key, String name);

    void updateStorage(Storage storage);

    void updateStorageDeleted(Storage storage);

    RoleListVO selectRoleList(Integer page, Integer limit, String sort, String order, String name);

    Role createRole(AddRoleBO addRoleBO);

    void deleteRole(Role role);

    void updateRole(Role role);

    List<String> selectPermissionByUsername(String username);

    PermissionVO selectRolePermissions(Integer roleId);

    void updateRolePermissions(AddPermissionBO addPermissionBO);

    void insertLog(Log log, HttpServletRequest request);

    void insertLogOut(Log log, HttpServletRequest request);

}
